Images are typically represented as two-dimensional matrices of picture elements, or pixels. Each pixel has an intensity level for each color component of the image. For example, a grayscale image may have pixels that each has an intensity level for a gray color component. By comparison, a color image may have pixels that each has intensity levels for red, green, and blue color components, or may have pixels that each has intensity levels for cyan, magenta, yellow, and black color components.
Printing devices, such as inkjet printers and laser printers, are commonly binary devices. For each pixel location on a printed medium, a binary printing device can print at one of two levels for each color component, on or off. Pixels having more than two levels of intensity for each color component thus have to be converted to pixels having only two levels of intensity for each color component. This conversion is known as halftoning; one common type of halftoning is error diffusion.